package com.gcb.common.enums;

/**
 * 码头状态
 */
public enum WharfStatus {
    OK(1, "正常"), DISABLE(0, "已禁用");

    private final Integer code;
    private final String info;

    WharfStatus(Integer code, String info) {
        this.code = code;
        this.info = info;
    }

    public Integer getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static String getInfo(Integer status) {
        WharfStatus[] values = WharfStatus.values();
        for (WharfStatus wharfStatus : values) {
            if (wharfStatus.getCode().equals(status)) {
                return wharfStatus.getInfo();
            }
        }
        return null;
    }
}
